<template>
  <el-form :model="form" label-width="100px" class="emergency-form">
    <el-row :gutter="20">
      <el-col :span="18">
        <el-form-item label="事件名称">
          <el-select
            style="width: 100%"
            v-model="form.eventName"
            placeholder="请选择事件"
          >
            <el-option
              label="2024年12月11日汤营超标"
              value="2024年12月11日汤营超标"
            ></el-option>
            <!-- 可根据需求添加更多选项 -->
          </el-select>
        </el-form-item>
      </el-col>
      <el-col :span="6">
        <el-form-item>
          <el-button type="primary">事件信息</el-button>
        </el-form-item>
      </el-col>
    </el-row>

    <el-form-item label="响应层级条件">
      <el-select
        v-model="form.responseCondition"
        style="width: 100%"
        placeholder="请选择"
      >
        <el-option
          label="对饮用水源保护区造成或可能造成影响"
          value="对饮用水源保护区造成或可能造成影响"
        ></el-option>
        <!-- 可根据需求添加更多选项 -->
      </el-select>
    </el-form-item>

    <el-form-item label="响应层级">
      <el-select
        v-model="form.responseLevel"
        style="width: 100%"
        placeholder="请选择"
      >
        <el-option label="县级" value="县级"></el-option>
        <!-- 可根据需求添加更多选项 -->
      </el-select>
    </el-form-item>

    <el-row :gutter="20">
      <el-col :span="12">
        <el-form-item label="审批领导">
          <el-input
            v-model="form.approveLeader"
            placeholder="请输入领导审批"
          ></el-input>
        </el-form-item>
      </el-col>
      <el-col :span="12">
        <el-form-item label="审批时间">
          <el-date-picker
            v-model="form.approveTime"
            type="datetime"
            value-format="yyyy-MM-dd HH:mm:ss"
            placeholder="选择日期时间"
            :default-time="['16:50:29', '']"
          ></el-date-picker>
        </el-form-item>
      </el-col>
    </el-row>

    <el-form-item label="审批意见">
      <el-input
        v-model="form.approveOpinion"
        type="textarea"
        placeholder="请输入审批意见"
        rows="3"
      ></el-input>
    </el-form-item>

    <el-row :gutter="20">
      <el-col :span="18">
        <el-form-item label="企业预案">
          <el-select
            v-model="form.enterprisePlan"
            style="width: 100%"
            placeholder="请选择"
          >
            <el-option label="沁平市" value="沁平市"></el-option>
            <!-- 可根据需求添加更多选项 -->
          </el-select>
        </el-form-item>
      </el-col>
      <el-col :span="6">
        <el-form-item>
          <el-button type="primary">预览详情</el-button>
        </el-form-item>
      </el-col>
    </el-row>

    <el-row :gutter="20">
      <el-col :span="18">
        <el-form-item label="政府预案">
          <el-select
            v-model="form.governmentPlan"
            style="width: 100%"
            placeholder="请选择"
          >
            <el-option label="沁平市" value="沁平市"></el-option>
            <!-- 可根据需求添加更多选项 -->
          </el-select>
        </el-form-item>
      </el-col>
      <el-col :span="6">
        <el-form-item>
          <el-button type="primary">预览详情</el-button>
        </el-form-item>
      </el-col>
    </el-row>

    <el-row :gutter="20" style="margin-top: 20px">
      <el-col :span="6">
        <el-form-item>
          <el-button type="primary">确定</el-button>
        </el-form-item>
      </el-col>
      <el-col :span="6">
        <el-form-item>
          <el-button>取消</el-button>
        </el-form-item>
      </el-col>
    </el-row>
  </el-form>
</template>

<script>
export default {
  name: "EmergencyApprovalForm",
  data() {
    return {
      form: {
        eventName: "2024年12月11日汤营超标",
        responseCondition: "对饮用水源保护区造成或可能造成影响",
        responseLevel: "县级",
        approveLeader: "",
        approveTime: "2025-01-07 16:50:29",
        approveOpinion: "",
        enterprisePlan: "沁平市",
        governmentPlan: "沁平市",
      },
    };
  },
  methods: {
    // 可根据需求添加表单提交、取消等方法
    submitForm() {
      console.log("表单数据：", this.form);
      // 对接接口逻辑...
    },
    cancelForm() {
      // 重置或关闭表单逻辑...
    },
  },
};
</script>

<style scoped>
.emergency-form {
  padding: 20px;
  box-sizing: border-box;
}
.el-button--primary {
  background-color: #409eff;
  border-color: #409eff;
}
.el-button--primary:hover {
  background-color: #66b1ff;
  border-color: #66b1ff;
}
</style>
